package com.xyd.Biz;

import com.xyd.Entity.Commodity;
import com.xyd.Entity.Page;

import java.util.List;

public interface CommodityBiz {
    /**
     *
     * @author 李思傧
     * @param id
     * @return Commodity
     * 根据商品对象的ID查询商品详细信息
     */
    public abstract Commodity SerachCommodityById(int id);
    /**
     * @ClassName:CommodityDao
     * @Description:  得到所有商品信息
     * @Author: 余全盛
     * @Date: 2021/10/15 15:59
     */
    List<Commodity> getAllCommodityInCar();

    List<Commodity> getAllCommodity();

    /**
     * @Description: 订单支付完成更新商品库存信息
     * @Param: [num, commodity_id]
     * @return: int
     * @Author: 余全盛
     * @Date: 2021/10/19 11:25
     */
    int updateCommodityInventory(int num, int commodity_id);

    int removeProductClassById(Commodity commodity);

    int updateProductById(Commodity commodity);

    int addProduct(Commodity commodity);

    int getCommodityCount();

    List<Commodity> getAllCommodityByPage(Page page);
}
